﻿/*
 * NetTcpServer.h
 */
#ifndef __GDK_NETTCPSERVER_H__
#define __GDK_NETTCPSERVER_H__

#include <gdk/core/EventDispenser.h>
#include <gdk/net/Socket.h>
#include <gdk/net/TcpServer.h>


namespace gdk
{

	class GDK_NET_EXPORT NetTcpServer : public TcpServer
	{
		DECLARE_CLASS_HANDLE(NetTcpServer)
		DECLARE_CLASS_INSTANCE(NetTcpServer)

	private:
		EventDispenser	_eventDispenser; //事件处理器

	private:
		NetTcpServer(void);
		~NetTcpServer(void);

	public:
		virtual void onAccept(void);

	public:
		__INLINE__ EventDispenser& getEventDispenser(void) { return _eventDispenser; }
		//-----------------------------------------------------------------------------

	public:
		uint16_t getPort(void) const;
	};
	typedef NetTcpServer::Handle NetTcpServerPtr;



} //namespace gdk


#endif //__GDK_NETTCPSERVER_H__
